home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / util / batch / edwinv1_00.lha / edwin.c < prev    next >
C/C++ Source or Header  |  1994-06-19  |  1KB  |  69 lines

  1. /*              **
  2. **  Edit Window **
  3. **              */
  4.  
  5. #include <stdio.h>
  6. #include <stdlib.h>
  7. #include <exec/exec.h>
  8. #include <exec/lists.h>
  9. #include <exec/memory.h>
  10. #include <exec/nodes.h>
  11. #include <exec/types.h>
  12. #include <intuition/intuition.h>
  13. #include <intuition/intuitionbase.h>
  14. #include <intuition/screens.h>
  15. #include <math.h>
  16. #include <string.h>
  17.  
  18. /* die entsprechenden Matheroutinen includen */
  19. #ifdef _M68881
  20.     #include <m68881.h>
  21. #endif
  22.  
  23. /* Prototypes für Libraryfunctions */
  24. #include <proto/exec.h>
  25. #include <proto/intuition.h>
  26.  
  27. /* Version | Revisionscontrol */
  28.  
  29. #define    VERSION        1
  30. #define    REVISION    00
  31. #define    DATE        "__Date__"
  32. #define    VERS        "EdWin 1.00"
  33. #define    VSTRING        "EdWin 1.00 ("__DATE__")\n\r"
  34. #define    VERSTAG        "\0$VER: EdWin 1.00 ("__DATE__")"
  35.  
  36. /* Globals */
  37.  
  38. UBYTE VersTag[]=VERSTAG;        /* Versionsstring */
  39. struct IntuitionBase    *IntuitionBase=0l;
  40. struct Window            *win=0l;
  41.  
  42. void main(int argc,char *argv[])
  43. {
  44.     WORD xpos,ypos,xres,yres;
  45.     ULONG lock;
  46.  
  47.     printf("\nEdWin V1.0\nby ENSONIC of TRINOMIC\n");
  48.     if(argc!=5)
  49.     {
  50.         printf("Usage : EdWin xpos ypos xres yres\n\n");
  51.     }
  52.     else
  53.     {
  54.         xpos=atoi(argv[1]);
  55.         ypos=atoi(argv[2]);
  56.         xres=atoi(argv[3]);
  57.         yres=atoi(argv[4]);
  58.  
  59.         if(IntuitionBase=OpenLibrary("intuition.library",37))
  60.         {
  61.             lock=LockIBase(0);
  62.             win=IntuitionBase->ActiveWindow;
  63.             UnlockIBase(lock);
  64.             ChangeWindowBox(win,xpos,ypos,xres,yres);
  65.             CloseLibrary(IntuitionBase);
  66.         }
  67.     }
  68. }
  69.